
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    show:true,
    scrollTop:0,
  },
  getters: {
  },
  mutations: {
    // 头部组件的显示隐藏
    change(state,shows){
      state.show = shows;
    },
    // 记录滚动页面距离
     set_scrollTop(state,scrollTop){
      state.scrollTop = scrollTop;
      console.log(state.scrollTop);

    }
  },
  actions: {
  },
  modules: {
  }
})
